package com.group01.community.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.group01.community.entity.SysDictData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.group01.community.entity.SysDictType;

import java.util.List;

/**
 * <p>
 * 字典数据表 Mapper 接口
 * </p>
 *
 * @author guoyuan
 * @since 2025-05-01
 */
public interface SysDictDataMapper extends BaseMapper<SysDictData> {
    /**
     * 根据字典类型查询字典数据
     *
     * @param dictId
     * @return
     */
    List<SysDictData> selectDictDataByDictId(Long dictId);

    /**
     * 查询所有字典名称
     *
     * @return
     */
    List<SysDictType> selectDictType();

    /**
     * 带条件查询
     *
     * @param sysDictData
     * @param iPage
     * @return
     */
    IPage<SysDictData> selectCondition(SysDictData sysDictData, IPage<SysDictData> iPage);

    /**
     * 分页查询
     *
     * @param iPage
     * @return
     */
    List<SysDictData> selectPage(IPage<SysDictData> iPage);
}
